package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbDiagnosisInfoMapper;
import com.ruoyi.system.domain.TbDiagnosisInfo;
import com.ruoyi.system.service.ITbDiagnosisInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 诊断信息Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-09
 */
@Service
public class TbDiagnosisInfoServiceImpl implements ITbDiagnosisInfoService
{
    @Autowired
    private TbDiagnosisInfoMapper tbDiagnosisInfoMapper;

    /**
     * 查询诊断信息
     *
     * @param userID 诊断信息主键
     * @return 诊断信息
     */
    @Override
    public TbDiagnosisInfo selectTbDiagnosisInfoByUserID(String userID)
    {
        return tbDiagnosisInfoMapper.selectTbDiagnosisInfoByUserID(userID);
    }

    /**
     * 查询诊断信息列表
     *
     * @param tbDiagnosisInfo 诊断信息
     * @return 诊断信息
     */
    @Override
    public List<TbDiagnosisInfo> selectTbDiagnosisInfoList(TbDiagnosisInfo tbDiagnosisInfo)
    {
        return tbDiagnosisInfoMapper.selectTbDiagnosisInfoList(tbDiagnosisInfo);
    }

    /**
     * 新增诊断信息
     *
     * @param tbDiagnosisInfo 诊断信息
     * @return 结果
     */
    @Override
    public int insertTbDiagnosisInfo(TbDiagnosisInfo tbDiagnosisInfo)
    {
        return tbDiagnosisInfoMapper.insertTbDiagnosisInfo(tbDiagnosisInfo);
    }

    /**
     * 修改诊断信息
     *
     * @param tbDiagnosisInfo 诊断信息
     * @return 结果
     */
    @Override
    public int updateTbDiagnosisInfo(TbDiagnosisInfo tbDiagnosisInfo)
    {
        return tbDiagnosisInfoMapper.updateTbDiagnosisInfo(tbDiagnosisInfo);
    }

    /**
     * 批量删除诊断信息
     *
     * @param userIDs 需要删除的诊断信息主键
     * @return 结果
     */
    @Override
    public int deleteTbDiagnosisInfoByUserIDs(String userIDs)
    {
        return tbDiagnosisInfoMapper.deleteTbDiagnosisInfoByUserIDs(Convert.toStrArray(userIDs));
    }

    /**
     * 删除诊断信息信息
     *
     * @param userID 诊断信息主键
     * @return 结果
     */
    @Override
    public int deleteTbDiagnosisInfoByUserID(String userID)
    {
        return tbDiagnosisInfoMapper.deleteTbDiagnosisInfoByUserID(userID);
    }
}
